package com.my.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.my.mapper.EmployeeMapper;
import com.my.model.bean.Employee;
import com.my.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl extends ServiceImpl<EmployeeMapper, Employee> implements EmployeeService {

    @Autowired
    EmployeeMapper employeeMapper;


    /**
     * 自定义service层方法
     * @return 所有员工
     */
    @Override
    public List<Employee> getAllEmployee() {
        return employeeMapper.findAll();
    }
}
